HAL XSPI high-speed interface and calibration functions migration ¶
The goal of this page is to show how to migrate the high-speed interface and calibration functions.
Set the delay values of the high-speed interface ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_XSPI_SetDelayValue(XSPI_HandleTypeDef *hxspi,
XSPI_HSCalTypeDef *const pCfg);
|
HAL_XSPI_HSIC_SetConfigDelay(hal_xspi_handle_t *hxspi,
const hal_xspi_hsic_config_t *p_config);
|
Example usage ¶
|
HAL1 |
HAL2 |
|---|---|
XSPI_HandleTypeDef hxspi1;
XSPI_HSCalTypeDef pCfg;
pCfg.DelayValueType= HAL_XSPI_CAL_FULL_CYCLE_DELAY;
pCfg.FineCalibrationUnit= 0x7FU;
pCfg.CoarseCalibrationUnit= 0x1FU;
pCfg.MaxCalibration= HAL_XSPI_MAXCAL_REACHED;
HAL_XSPI_SetDelayValue(hxspi1, &pCfg)
|
hal_xspi_handle_t gh_xspi;
hal_xspi_hsic_config_t p_config;
p_config.delay_value_type = HAL_XSPI_HSIC_DELAY_CAL_FULL_CYCLE;
p_config.fine_cal_unit= 0x7F;
p_config.coarse_cal_unit= 0x1F;
p_config.max_cal=HAL_XSPI_HSIC_MAX_CAL_REACHED;
HAL_XSPI_HSIC_SetConfigDelay(&gh_xspi, &p_config);
|
Get the delay values of the high-speed interface ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_XSPI_GetDelayValue(XSPI_HandleTypeDef *hxspi,
XSPI_HSCalTypeDef *const pCfg);
|
HAL_XSPI_HSIC_GetConfigDelay(const hal_xspi_handle_t *hxspi,
hal_xspi_hsic_config_t *p_config);
|
Example usage ¶
|
HAL1 |
HAL2 |
|---|---|
XSPI_HandleTypeDef hxspi1;
XSPI_HSCalTypeDef pCfg;
pCfg.DelayValueType= HAL_XSPI_CAL_FEEDBACK_CLK_DELAY;
pCfg.FineCalibrationUnit= 0x7FU;
pCfg.CoarseCalibrationUnit= 0x1FU;
pCfg.MaxCalibration= HAL_XSPI_MAXCAL_REACHED;
HAL_XSPI_GetDelayValue(&hxspi1, &pCfg)
|
hal_xspi_handle_t gh_xspi;
hal_xspi_hsic_config_t p_config;
p_config.delay_value_type = HAL_XSPI_HSIC_DELAY_CAL_FEEDBACK_CLK;
p_config.fine_cal_unit= 0x7F;
p_config.coarse_cal_unit= 0x1F;
p_config.max_cal=HAL_XSPI_HSIC_MAX_CAL_REACHED;
HAL_XSPI_HSIC_GetConfigDelay(&gh_xspi, &p_config);
|